package com.ruoyi.invoice.domain;

import java.util.List;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

import javax.validation.constraints.NotBlank;

/**
 * 销项发票对象 invoice
 * 
 * @author XU
 * @date 2025-03-13
 */
public class Invoice extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 序号 */
    private Long id;

    /** 发票号码 */
    @Excel(name = "发票号码")
    @NotBlank(message = "发票号码不能为空")
    private String invoiceNumber;

    /** 开票日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开票日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date invoiceDate;

    /** 发票类型 */
    @Excel(name = "发票类型")
    @NotBlank(message = "发票类型不能为空")
    private Long invoiceType;

    /** 发票代码 */
    @Excel(name = "发票代码")
    private String invoiceCode;

    /** 客户名称 */
    @Excel(name = "客户名称")
    @NotBlank(message = "客户名称不能为空")
    private String customerName;

    /** 地址、电话 */
    @Excel(name = "地址、电话")
    private String address;

    /** 开具方式 */
    private String issuingMethod;

    /** 项目 */
    private Long item;

    /** 纳税人识别号 */
    @Excel(name = "纳税人识别号")
    private String taxpayerIdentification;

    /** 开户行及账号 */
    @Excel(name = "开户行及账号")
    private String bankAndNumber;

    /** 是否作废 */
    @Excel(name = "是否作废")
    private Long voidOrNot;

    /** 上传附件 */
    private String uploadAttachment;

    /** 发票数据 */
    private Long fpId;

    /** 凭证ID */
    private Long pzId;

    /** 业务类型 */
    @Excel(name = "业务类型")
    @NotBlank(message = "业务类型不能为空")
    private Long businessTypel;

    /** 模板名称 */
    @Excel(name = "模板名称")
    private Long templateName;

    /** 是否生成单据 */
    @Excel(name = "是否生成单据")
    private Long receipt;

    /** 发票数据信息 */
    private List<TaxItem> taxItemList;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setInvoiceNumber(String invoiceNumber) 
    {
        this.invoiceNumber = invoiceNumber;
    }

    public String getInvoiceNumber() 
    {
        return invoiceNumber;
    }

    public void setInvoiceDate(Date invoiceDate) 
    {
        this.invoiceDate = invoiceDate;
    }

    public Date getInvoiceDate() 
    {
        return invoiceDate;
    }

    public void setInvoiceType(Long invoiceType) 
    {
        this.invoiceType = invoiceType;
    }

    public Long getInvoiceType() 
    {
        return invoiceType;
    }

    public void setInvoiceCode(String invoiceCode) 
    {
        this.invoiceCode = invoiceCode;
    }

    public String getInvoiceCode() 
    {
        return invoiceCode;
    }

    public void setCustomerName(String customerName) 
    {
        this.customerName = customerName;
    }

    public String getCustomerName() 
    {
        return customerName;
    }

    public void setAddress(String address) 
    {
        this.address = address;
    }

    public String getAddress() 
    {
        return address;
    }

    public void setIssuingMethod(String issuingMethod) 
    {
        this.issuingMethod = issuingMethod;
    }

    public String getIssuingMethod() 
    {
        return issuingMethod;
    }

    public void setItem(Long item) 
    {
        this.item = item;
    }

    public Long getItem() 
    {
        return item;
    }

    public void setTaxpayerIdentification(String taxpayerIdentification) 
    {
        this.taxpayerIdentification = taxpayerIdentification;
    }

    public String getTaxpayerIdentification() 
    {
        return taxpayerIdentification;
    }

    public void setBankAndNumber(String bankAndNumber) 
    {
        this.bankAndNumber = bankAndNumber;
    }

    public String getBankAndNumber() 
    {
        return bankAndNumber;
    }

    public void setVoidOrNot(Long voidOrNot) 
    {
        this.voidOrNot = voidOrNot;
    }

    public Long getVoidOrNot() 
    {
        return voidOrNot;
    }

    public void setUploadAttachment(String uploadAttachment) 
    {
        this.uploadAttachment = uploadAttachment;
    }

    public String getUploadAttachment() 
    {
        return uploadAttachment;
    }

    public void setFpId(Long fpId) 
    {
        this.fpId = fpId;
    }

    public Long getFpId() 
    {
        return fpId;
    }

    public void setPzId(Long pzId) 
    {
        this.pzId = pzId;
    }

    public Long getPzId() 
    {
        return pzId;
    }

    public void setBusinessTypel(Long businessTypel) 
    {
        this.businessTypel = businessTypel;
    }

    public Long getBusinessTypel() 
    {
        return businessTypel;
    }

    public void setTemplateName(Long templateName) 
    {
        this.templateName = templateName;
    }

    public Long getTemplateName() 
    {
        return templateName;
    }

    public void setReceipt(Long receipt) 
    {
        this.receipt = receipt;
    }

    public Long getReceipt() 
    {
        return receipt;
    }

    public List<TaxItem> getTaxItemList()
    {
        return taxItemList;
    }

    public void setTaxItemList(List<TaxItem> taxItemList)
    {
        this.taxItemList = taxItemList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("invoiceNumber", getInvoiceNumber())
            .append("invoiceDate", getInvoiceDate())
            .append("invoiceType", getInvoiceType())
            .append("invoiceCode", getInvoiceCode())
            .append("customerName", getCustomerName())
            .append("address", getAddress())
            .append("issuingMethod", getIssuingMethod())
            .append("item", getItem())
            .append("taxpayerIdentification", getTaxpayerIdentification())
            .append("bankAndNumber", getBankAndNumber())
            .append("voidOrNot", getVoidOrNot())
            .append("remark", getRemark())
            .append("uploadAttachment", getUploadAttachment())
            .append("fpId", getFpId())
            .append("pzId", getPzId())
            .append("businessTypel", getBusinessTypel())
            .append("templateName", getTemplateName())
            .append("receipt", getReceipt())
            .append("taxItemList", getTaxItemList())
            .toString();
    }
}
